var app = new Vue({
    el: '#finishDialog',
    data: {
        mazeCounter: 0,
    },
    mounted() {
        this.mazeCounterFunc(0,60);
    },
    methods: {
        mazeCounterFunc(minTime = 0, maxTime = 60,counterControl=true) {
            const self = this;
            let increaseNumber = function () {
                let counter = null;
                minTime++;
                if (minTime < maxTime && counterControl) {
                    counter = setTimeout(increaseNumber, 1000);
                    self.mazeCounter = minTime;
                    console.log('self.mazeCounter ', self.mazeCounter);

                } else {
                    console.error("Done");
                    clearTimeout(counter);
                }
            }
            setTimeout(increaseNumber, 1000);
        }
    }
})